package com.myzl.coal.client.channel.init;

import com.myzl.coal.client.channel.init.base.TcpChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.HttpServerCodec;
import lombok.AllArgsConstructor;
import lombok.Data;


/**
 * @ClassName ClientChannelInitializer
 * @Author wzb
 * @Date 2023/1/18 16:08
 * @Description
 */
@Data
@AllArgsConstructor
public class HttpChannelInitializer extends TcpChannelInitializer {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(new HttpServerCodec());
    }
}
